<?php
// +-------------------------------------------------------------------
// |
// +-------------------------------------------------------------------
// | Copyright (c) 2009-2016 All rights reserved.
// +-------------------------------------------------------------------
namespace Service\Api\V1;

use Think\Exception;

class ArchivesDel
{
    public $login = true; //是否需要登录才能访问该接口
    public $title = "档案删除";
    public $group = '档案管理';
    public $desc = "";

    public $input = [
        'id' => 'required;int;label=档案id;',
    ];

    public $output = [

    ];

    public function run($param, $uid)
    {
        $flag = M('eyes_archives')->where(['id' => $param['id'], 'userid' => $uid])->delete();
        if($flag){
            return true;
        }else{
            throw new Exception('删除失败');
        }
    }
}
